package top.zywork.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.zywork.dao.MallStatisticsDAO;
import top.zywork.dao.UserLivenessStatisticsDAO;
import top.zywork.query.GoodsOrderQuery;
import top.zywork.query.UserGoodsOrderQuery;
import top.zywork.service.MallStatisticsService;
import top.zywork.service.UserLivenessStatisticsService;
import top.zywork.vo.StatisticsDayCountVO;

import java.util.Date;
import java.util.List;

/**
 * 商城相关统计服务接口实现类<br/>
 *
 * 创建于2019-11-16<br/>
 *
 * @author http://zywork.top 王振宇
 * @version 1.0
 */
@Service
public class MallStatisticsServiceImpl implements MallStatisticsService {

    private MallStatisticsDAO mallStatisticsDAO;

    @Override
    public Long countAllGoods() {
        return mallStatisticsDAO.countAllGoods();
    }

    @Override
    public Long countAllOnShelfGoods() {
        return mallStatisticsDAO.countAllOnShelfGoods();
    }

    @Override
    public Long countAllGoodsSkus() {
        return mallStatisticsDAO.countAllGoodsSkus();
    }

    @Override
    public List<StatisticsDayCountVO> countDayGoodsByTime(Date beginTime, Date endTime) {
        return mallStatisticsDAO.countDayGoodsByTime(beginTime, endTime);
    }

    @Override
    public Long countAllGoodsByTime(Date beginTime, Date endTime) {
        return mallStatisticsDAO.countAllGoodsByTime(beginTime, endTime);
    }

    @Override
    public Long countAllGoodsOrder() {
        return mallStatisticsDAO.countAllGoodsOrder();
    }

    @Override
    public Long countAllGoodsOrderByStatus(Byte orderStatus) {
        return mallStatisticsDAO.countAllGoodsOrderByStatus(orderStatus);
    }

    @Override
    public List<StatisticsDayCountVO> countDayGoodsOrderByTime(Date beginTime, Date endTime, Object query) {
        return mallStatisticsDAO.countDayGoodsOrderByTime(beginTime, endTime, query);
    }

    @Override
    public Long countAllGoodsOrderByTime(Date beginTime, Date endTime) {
        return mallStatisticsDAO.countAllGoodsOrderByTime(beginTime, endTime);
    }

    @Autowired
    public void setMallStatisticsDAO(MallStatisticsDAO mallStatisticsDAO) {
        this.mallStatisticsDAO = mallStatisticsDAO;
    }

}
